#ifndef ALGORITHM_H
#define ALGORITHM_H

#include <iostream>
#include "CheckerBoard.h"

using namespace std;

class GoBangAlgorithm {
private:
    string ChessNodeTranslate(ChessNode a, ChessRoute r);
    char* StringToCharArr(string str);
    string SubStringMix(string left, string right);
    string StringReverse(string str);

public:
    GoBangAlgorithm();
    int GoBangWinnerScanner(ChessNode **Board, ChessNode ScanNode, int Location_X, int Location_Y, int Count, int Size, int Mode, int Step);
    string* GoBangScanner(ChessNode ScanNode, ChessNode** Board, ChessRoute r, int Size);
    bool bKMP(string StrLong, string StrShort);
    int iKMP(string StrLong, string StrShort);
    int GoBangJudger(ChessRoute r, ChessNode **Board, int Size);
};

#endif // ALGORITHM_H